<?php
namespace app\controller;

use app\BaseController;
use think\response\Json;
use app\common\AliOss;


class Index extends BaseController
{
    public function __call($method,$args)
    {

        return $this->request->isAjax() || $this->request->isPost() ? json(['code'=>404,'msg'=>'page not found'],404):'<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>404</title>
    <style>
    html,body{
    height: 99%;
    }
    .content{
        text-align: center;
        height: 100%;
    }
    .content img{
    max-height: 100%;
    max-width: 40%;
    }
</style>
</head>
<body><div class="content"><img src="/static/image/404.svg" /></div></body>
</html>';

    }

    public function addApi()
    {
        return '<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        input{
            height: 28px;margin-right: 10px;
        }
        .button{
            border: none;color: rgba(255,255,255,.9);cursor: pointer;height: 34px;
            background-color: #16baaa;padding: 0 18px;font-size: 14px;
        }
        .button:hover{
            color: #fff;
        }
    </style>
</head>
<body>
<form action="/AdminMenu/addApi.html" method="post" enctype="multipart/form-data">
  <input type="text" name="controller" placeholder="控制器名称"/>
  <input type="text" name="model" placeholder="模型名称"/>
  <input type="text" name="token" placeholder="token"/>
  <input type="submit" class="button" value="添 加" />
</form>
</body>
</html>';
    }

    public function comment()
    {
        return view();
    }

    public function test(){


        dump($this->app);



        return '';
    }



}
